home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
program
/
ddmoduls.lha
/
dd_Modules
/
dd_hardware
/
dd_ciatimer.doc
< prev
next >
Wrap
Text File
|
1995-04-01
|
2KB
|
95 lines
dd_blackboxes/dd_ciatimer
NAME
dd_ciatimer.m -- oo class for cia hardware timers (V37)
dd_ciatimer_v40.m -- oo class for cia hardware timers (V40)
AUTHOR
Leon Woestenberg of Digital Disturbance (Email: leon@stack.urc.tue.nl)
DESCRIPTION
The dd_ciatimer class provides a system friendly way of using the Amiga
cia hardware timer devices. These timers can be used for high precision
timing of interrupts, output signals etc.
FEATURES
Allocates any of the four timers, instead of just trying for one of
them. The wanted cia and timer can be set, but in fallback mode, any
other timer can be used if the prefered one was in use.
There are two class implementations, one for Kickstart v37+ and one
for v40+ equipped Amigas. The class interface is exactly the same,
while the (hidden) implementation differs a lot. This shows the power
of data hiding of object oriented programming.
The class interface uses tag items, a well known way of accessing
operating system functions since v37.
METHODS
new -- construct a class instance
SYNOPSIS
instance.new(tags:PTR TO tagitem)
TAGS
DDA_CIA_Interrupt (PTR TO is) - Obligatory pointer to interrupt
structure that handles the timer interrupts.
DDA_CIA_UseCIAA (LONG) - Flag indicating if a timer of CIA A
should be used. If not, CIA B is used.
DDA_CIA_UseTimerA (LONG) - Flag indicating if a timer A should
be used. If not, timer B is used.
DDA_CIA_FallBack (LONG) - If TRUE, any timer can be used. The
prefered timer is tried first.
RESULT
Returns FALSE if the initialization failed.
set -- set attributes
SYNOPSIS
instance.set(tags:PTR TO tagitem)
TAGS
DDA_CIA_MicroSecs (LONG) - The countdown cycle time in microseconds
(µs = 1/1000000 of a second).
start -- start timer
SYNOPSIS
instance.start()
stop -- stop timer
SYNOPSIS
instance.stop()
end -- destruct a class instance
SYNOPSIS
instance.end()
TODO
- Use method tags as in DoMethod, instead of using seperate method calls.
- Comment and clean up the sources.
BUGS
The v40+ implementation is always in fallback mode. This is built in
the lowlevel.library so there is now way to get the wanted timer for
sure using this implementation.
SEE ALSO
dd_ciatimertest.e